home *** CD-ROM | disk | FTP | other *** search
- ////////////////////////////////////////////////////////////////////////////////////////////
- //
- // PRODUCT: Norton Internet Security/Symantec Desktop Firewall
- //
- // NAME: wiz-CreateAccounts (Javascript file for wiz-CreateAccounts.HTM)
- //
- // Copyright (c) by Symantec Corporation. All rights reserved.
- //
- ////////////////////////////////////////////////////////////////////////////////////////////
-
-
-
- function OnLoad()
- {
- // Disable NextButton so user cannot constantly click next.
- window.parent.frames("bottom").NextB.disabled = true;
-
- AccountName1.focus();
- window.NISTitleName1.innerText = WrapNisum.ProductName;
-
- // Set NIS Pro Specific Text
- var sProductType = WrapNisum.ProductType ;
-
- if(sProductType == "PT_PRO")
- {
- window.ParentalProductivityTitle1.innerText = StrID("ParentalControl_Title_NISPRO");
-
- // Adjust the drop down menus..
- // Note: Remove unwanted items *before* replacing text
- // of remaining items. Otherwise dropdowns get corrupted
- // on Win2K + IE 5.0 (defect #404527)
- select1.removeChild(window.IDS_CREATEACCOUNTEXT4); // Remove the teenager option
- window.IDS_CREATEACCOUNTEXT3.innerText = StrID("ParentalProductivityRestricted_NISPRO_Caps");
- window.IDS_CREATEACCOUNTEXT5.innerText = StrID("ParentalProductivityStandard_NISPRO_Caps");
-
- select2.removeChild(window.IDS_CREATEACCOUNTEXT8); // Remove the teenager option
- window.IDS_CREATEACCOUNTEXT7.innerText = StrID("ParentalProductivityRestricted_NISPRO_Caps");
- window.IDS_CREATEACCOUNTEXT9.innerText = StrID("ParentalProductivityStandard_NISPRO_Caps");
-
- select3.removeChild(window.IDS_CREATEACCOUNTEXT12); // Remove the teenager option
- window.IDS_CREATEACCOUNTEXT11.innerText = StrID("ParentalProductivityRestricted_NISPRO_Caps");
- window.IDS_CREATEACCOUNTEXT13.innerText = StrID("ParentalProductivityStandard_NISPRO_Caps");
-
-
- select4.removeChild(window.IDS_CREATEACCOUNTEXT16); // Remove the teenager option
- window.IDS_CREATEACCOUNTEXT15.innerText = StrID("ParentalProductivityRestricted_NISPRO_Caps");
- window.IDS_CREATEACCOUNTEXT17.innerText = StrID("ParentalProductivityStandard_NISPRO_Caps");
- /*
- select5.removeChild(window.IDS_CREATEACCOUNTEXT20); // Remove the teenager option
- window.IDS_CREATEACCOUNTEXT19.innerText = StrID("ParentalProductivityRestricted_NISPRO_Caps");
- window.IDS_CREATEACCOUNTEXT21.innerText = StrID("ParentalProductivityStandard_NISPRO_Caps");
- */
-
- // End of adjusting drop down menus
- window.ParentalProductivityRestricted8.innerText = StrID("ParentalProductivityRestricted_NISPRO_Caps");
- window.ParentalProductivityStandard8.innerText = StrID("ParentalProductivityStandard_NISPRO_Caps");
-
- window.ParentalProductivityNumber.innerText = StrID("ParentalProductivity_Number");
-
- ID_WIZ_CREATEACCOUNTS_TD6.style.display = "none";
- ID_WIZ_CREATEACCOUNTS_TD7.style.display = "none";
- IDS_NISTIP.style.display = "none";
- }
- else
- {
- // Must modify the text string for NON Pro since we changed the default to NISPro text
- // This was done so we have the "longer strings" by default and thus the drop down combo box can fit the longer strings
-
- // Adjust the drop down menus..
- window.IDS_CREATEACCOUNTEXT3.innerText = StrID("ParentalProductivityRestricted_NIS_Caps");
- window.IDS_CREATEACCOUNTEXT5.innerText = StrID("ParentalProductivityStandard_NIS_Caps");
-
- window.IDS_CREATEACCOUNTEXT7.innerText = StrID("ParentalProductivityRestricted_NIS_Caps");
- window.IDS_CREATEACCOUNTEXT9.innerText = StrID("ParentalProductivityStandard_NIS_Caps");
-
- window.IDS_CREATEACCOUNTEXT11.innerText = StrID("ParentalProductivityRestricted_NIS_Caps");
- window.IDS_CREATEACCOUNTEXT13.innerText = StrID("ParentalProductivityStandard_NIS_Caps");
-
-
- window.IDS_CREATEACCOUNTEXT15.innerText = StrID("ParentalProductivityRestricted_NIS_Caps");
- window.IDS_CREATEACCOUNTEXT17.innerText = StrID("ParentalProductivityStandard_NIS_Caps");
- /*
- window.IDS_CREATEACCOUNTEXT19.innerText = StrID("ParentalProductivityRestricted_NIS_Caps");
- window.IDS_CREATEACCOUNTEXT21.innerText = StrID("ParentalProductivityStandard_NIS_Caps");
- */
- }
-
- // Enable NextButton
- window.parent.frames("bottom").NextB.disabled = false;
- }
-
- function Page_GoNext()
- {
- try
- {
- // Disable NextButton
- window.parent.frames("bottom").NextB.disabled = true;
-
- var iAccountIndex = 0;
- // Verify Names
-
- if (AccountName1.value.length > 0)
- {
- // Fix Defect#361885, make sure account names entered are unique and not duplicated
- if ((stricmp(AccountName1.value, AccountName2.value) == 0)
- || (stricmp(AccountName1.value, AccountName3.value) == 0)
- || (stricmp(AccountName1.value, AccountName4.value) == 0)
- )
- {
- alert(StrID("ParentalProductivity_AccountNamesNotUnique"));
- window.parent.frames("bottom").NextB.disabled = false;
- return false;
- }
-
- // Fix Defect#362860. Making sure that account name is valid, i.e. not already used and valid account name
- var reason = 0;
- var validName = parent.UserManager.VerifyUserName(AccountName1.value, true, null, reason);
-
- if(!validName)
- {
- window.parent.frames("bottom").NextB.disabled = false;
- return false;
- }
- parent.window.SetAccountInfo(iAccountIndex, AccountName1.value, null, select1.value);
- iAccountIndex++;
- }
-
- if (AccountName2.value.length > 0)
- {
-
- if( (stricmp(AccountName2.value, AccountName1.value)==0)
- || (stricmp(AccountName2.value, AccountName3.value)==0)
- || (stricmp(AccountName2.value, AccountName4.value)==0)
- )
- {
- alert(StrID("ParentalProductivity_AccountNamesNotUnique"));
- window.parent.frames("bottom").NextB.disabled = false;
- return false;
- }
-
- var reason = 0;
- var validName = parent.UserManager.VerifyUserName(AccountName2.value, true, null, reason);
-
- if(!validName)
- {
- window.parent.frames("bottom").NextB.disabled = false;
- return false;
- }
- parent.window.SetAccountInfo(iAccountIndex, AccountName2.value, null, select2.value);
- iAccountIndex++;
- }
-
- if (AccountName3.value.length > 0)
- {
- if( (stricmp(AccountName3.value, AccountName1.value)==0)
- || (stricmp(AccountName3.value, AccountName2.value)==0)
- || (stricmp(AccountName3.value, AccountName4.value)==0)
- )
- {
- alert(StrID("ParentalProductivity_AccountNamesNotUnique"));
- {
- window.parent.frames("bottom").NextB.disabled = false;
- return false;
- }
- }
-
- var reason = 0;
- var validName = parent.UserManager.VerifyUserName(AccountName3.value, true, null, reason);
-
- if(!validName)
- {
- window.parent.frames("bottom").NextB.disabled = false;
- return false;
- }
-
- parent.window.SetAccountInfo(iAccountIndex, AccountName3.value, null, select3.value);
- iAccountIndex++;
- }
-
- if (AccountName4.value.length > 0)
- {
- if( (stricmp(AccountName4.value, AccountName1.value)==0)
- || (stricmp(AccountName4.value, AccountName2.value)==0)
- || (stricmp(AccountName4.value, AccountName3.value)==0)
- )
- {
- alert(StrID("ParentalProductivity_AccountNamesNotUnique"));
- window.parent.frames("bottom").NextB.disabled = false;
- return false;
- }
-
- var reason = 0;
- var validName = parent.UserManager.VerifyUserName(AccountName4.value, true, null, reason);
-
- if(!validName)
- {
- window.parent.frames("bottom").NextB.disabled = false;
- return false;
- }
-
- parent.window.SetAccountInfo(iAccountIndex, AccountName4.value, null, select4.value);
- iAccountIndex++;
- }
-
- // Tell parent window, how many accounts to set
- parent.window.SetAccountNum(iAccountIndex);
- window.parent.frames("bottom").NextB.disabled = false;
- return true;
- }
- catch(err)
- {
- window.parent.frames("bottom").NextB.disabled = false;
- }
- }
-
- function Page_GoBack()
- {
- return true;
- }
-
- function OnKeyDownHandler()
- {
- // Last Control Tab over to the <back, next, close> button.
- var VK_ESCAPE = 27;
-
- if (window.event.keyCode == VK_ESCAPE)
- {
- // Escape key.. We want to exit out of the wizard..
- parent.window.navigate("res://closeme.xyz");
- }
- }
-
- function stricmp(szA, szB)
- {
- if(szA.toUpperCase() < szB.toUpperCase())
- return -1;
- else if(szA.toUpperCase() > szB.toUpperCase())
- return 1;
-
- return 0;
- }
-